package com.chaos.eurekaproducer.listener;

import com.chaos.eurekaproducer.domain.User;
import lombok.Data;
import org.springframework.context.ApplicationEvent;

/**
 * @author liaopeng
 * @title: MyEvent
 * @projectName eureka-producer
 * @description: 自定义事件
 * @date 2021/9/24下午5:51
 */
public class MyEvent extends ApplicationEvent {

    private User user;

    public MyEvent(Object source,User user) {
        super(source);
        this.user=user;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
